class MyClass():

    # def __init__(self):
    #     pass
    # 构造函数
    def __init__(self, name, score):
        self.name = name
        self.score = score
    def print_name(self):
        print('your name:{}'.format(name))
        
    def print_all(self):
        print("your name: {} and score: {}".format(name, score))

name = 'lee'
score = 100
# 创建对象
m = MyClass(name, score)
# 调用方法
m.print_all()
# 访问属性
print(m.name)
print(m.score)
# 创建多个实例
n = MyClass('teee', 90)
n.print_all()